clear

* use data entitled Experiment 2 Mturk.dta (ignore my filepath in the next line)

use "C:\BNewman Transferred Files\Research\Representation\income and dr\experiment 2 mturk for replication.dta" 

recode var_cont .=0
recode var_mid .=0
recode var_high .=0

* rescale so higher is more favorable

replace leadership=(leadership*-1)+6
replace intelligent=(intelligent*-1)+6
replace cares=(cares*-1)+6
replace honest=(honest*-1)+6
replace represent=(represent*-1)+5
replace votechoice=(votechoice*-1)+5


* Recode all to 0-1 scale
gen leadership01=(leadership-1)/4
gen intelligent01=(intelligent-1)/4
gen cares01=(cares-1)/4
gen honest01=(honest-1)/4
gen represent01=(represent-1)/3
gen votechoice01=(votechoice-1)/3

* set up treatment so that 0 = no income stated, 1 = 75k, 2 = 3 million
gen treatment_recode=.
replace treatment_recode=0 if var_cont==1
replace treatment_recode=1 if var_mid==1
replace treatment_recode=2 if var_high==1

* Figure 1 (0-1 scale)

mean leadership01, over (treatment_recode)
mean intelligent01, over (treatment_recode)
mean cares01, over (treatment_recode)
mean honest01, over (treatment_recode)
mean represent01, over (treatment_recode)
mean votechoice01, over (treatment_recode)

* regression setup for hypothesis tests, comparison group is 0, no income stated
reg leadership01 i.treatment_recode
reg intelligent01 i.treatment_recode
reg cares01 i.treatment_recode
reg honest01 i.treatment_recode
reg represent01 i.treatment_recode
reg votechoice01 i.treatment_recode


* Figure 2 bars are comparison of $3 million (category 2) - no income stated (0 or "base")

reg leadership01 i.treatment_recode
contrast treatment_recode, effects

reg intelligent01 i.treatment_recode
contrast treatment_recode, effects

reg cares01 i.treatment_recode
contrast treatment_recode, effects

reg honest01 i.treatment_recode
contrast treatment_recode, effects

reg represent01 i.treatment_recode
contrast treatment_recode, effects

reg votechoice01 i.treatment_recode
contrast treatment_recode, effects


* oprobits for appendix

oprobit leadership i.treatment_recode
oprobit intelligent i.treatment_recode
oprobit honest i.treatment_recode
oprobit cares i.treatment_recode
oprobit representation i.treatment_recode
oprobit votechoice i.treatment_recode



